﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Delete-test.aspx.cs" Inherits="Delete_test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("body img").click(function () {
                var name = $(this).attr("alt");
                $.ajax({
                    url: 'DeletePicsForm.aspx?picname=' + name,
                    type: 'GET',
                    timeout: 1000,
                    error: function () {
                        $.messager.alert('错误', '删除失败!', 'error');
                    },
                    success: function (data) {
                        eval('data=' + data);
                        if (data.success) {
                            grid.datagrid('reload');
                            grid.datagrid('clearSelections');
                        } else {
                            $.messager.alert('错误', data.msg, 'error');
                        }
                    }
                });
            });
        });
    </script>
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <img src="images/cry.gif"  alt="cry.gif" style="height: 71px; width: 106px" />
    </div>
    </form>
</body>
</html>
